<?php
namespace Admin\Service;

use Think\Service\BasicService;

class BookCaseModelService extends BasicService {
    public function insert($model) {
        return $this->db->add($model);
    }

    public function AddAll($model){
        $data =  $this->db->addAll($model);
        return $data;
    }

    public function remove($condition) {
        return $this->db->where($condition)->delete();
    }

    public function update($where, $model = array()) {
        return $this->db->where($where)->save($model);
    }

    public function find($condition) {
        return $this->db->where($condition)->find();
    }

    public function query($condition,$limit=array()) {
        $data = $this->db->where($condition)->limit($limit['start'],$limit['end'])->select();
        return $data;
    }
    public function count($condition){
        return  $this->db->where($condition)->count();
    }


}

?>